﻿using System.IO;

namespace WindowsFormsApp_consoleExec
{
    class LogFileHelper
    {
        private LogFileHelper()
        {

        }

        private FileStream fs;
        private string FilePath = "";

        public LogFileHelper(string path)
        {
            FilePath = path;
        }

        public void WriteLine(string s)
        {
            fs = File.Open(FilePath, FileMode.Append);
            byte[] buffer = System.Text.Encoding.UTF8.GetBytes(s+"\r\n");
            fs.Write(buffer, 0, buffer.Length);
            fs.Close();
        }
    }
}
